package com.late13.myapplication;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Task {

    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
    public static final String DATE_DEFAULT_STRING = "无期限";
    public static final int SORT_BY_DATE = 1;
    public static final int SORT_BY_ID = 0;

    private int taskId;
    private String taskTitle;
    private String taskContent;
    private boolean isTaskFinished;
    private Date dueDate;

    public Task() {
        taskId = -1;
        taskTitle = "";
        taskContent = "";
        isTaskFinished = false;
        dueDate = null;
    }

    public Task(int id, String taskTitle) {
        this.taskId = id;
        this.taskTitle = taskTitle;
        this.isTaskFinished = false;
        this.taskContent = "";
        this.dueDate = null;
    }

    public Task(int taskId, String taskTitle, boolean isTaskFinished, Date dueDate) {
        this.taskId = taskId;
        this.isTaskFinished = isTaskFinished;
        this.taskTitle = taskTitle;
        this.taskContent = "";
        this.dueDate = dueDate;
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        this.taskId = taskId;
    }

    public void setTaskTitle(String taskTitle) {
        this.taskTitle = taskTitle;
    }

    public void setTaskContent(String taskContent) {
        this.taskContent = taskContent;
    }

    public void setTaskFinished(boolean taskFinished) {
        isTaskFinished = taskFinished;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public String getTaskTitle() {
        return taskTitle;
    }

    public String getTaskContent() {
        return taskContent;
    }

    public boolean isTaskFinished() {
        return isTaskFinished;
    }

    public Date getDueDate() {
        return dueDate;
    }
}
